#ifndef ACTIVETRANSFER_H
#define ACTIVETRANSFER_H

#include "common/networkhandler.h"
#include "codec/vpxdecoder.h"

class ActiveHandler : public NetWorkHandler
{
    Q_OBJECT
public:
    explicit ActiveHandler(VPxDecoder *decoder,QObject *parent = nullptr );
    ~ActiveHandler();

    VPxDecoder *m_VpxDecoder ;
    bool m_isAuthenticated ;
    QString targetId ;

signals:
   void remoteConnectError(QString);
   void showInputPasswdDlg();
   void imageParameters(int width,int height);
   void vpxDecoderOkARGBImage(int pox,int poy,const QImage &image);
protected:
    //处理协议数据
    void dealProto(int i,BigPack::Exchange resv_exc) override;
protected:
    void createToHandler() override;
public slots:    
    void requestDesk();
    void queryHost(QString targethostId);
    void slotRequestAuth(QString targetId, QString targetPasswd);
    void slotSendMouseMove(QPoint point);
    void slotSendMouseKeys(int code ,bool state);
    void sendleaveLook();
    void slotSendWheelEvent(bool detal);
    void slotSendKeyboard(int code, bool state);
signals:
   void connectRemoteDevice();


};

#endif // ACTIVETRANSFER_H
